package net.gq.logistics.pojo;

import org.springframework.stereotype.Component;

/**
 * @author ASUS
 * @date 2020/5/12
 */

@Component("resultData")
public class ResultData {

    private Integer Code;  //0失败，1成功
    private String  Msg;   //成功或者失败的提示信息

    public Integer getCode() {
        return Code;
    }

    public void setCode(Integer code) {
        Code = code;
    }

    public String getMsg() {
        return Msg;
    }

    public void setMsg(String msg) {
        Msg = msg;
    }

    @Override
    public String toString() {
        return "ResultData{" + "Code=" + Code + ", Msg='" + Msg + '\'' + '}';
    }

    public static ResultData createRs(Integer code,String msg){

        ResultData rs=new ResultData();

        rs.setCode(code);
        rs.setMsg(msg);

        return rs;
    }
}
